<%@include file="../template/taglibs.jsp"%>
<%@ taglib tagdir="/WEB-INF/tags" prefix="m"%> 

<html>
	<style type="text/css"> 
	.SM_po90023 {width:129px; position:relative; top:0;border-top:; background-image: url('resources/imagenes/tab.gif'); font:11px arial; color:white; text-align:center; padding:4px; cursor:hand;}
	.SM_p90023  {width:129px; position:relative; top:0;border-top:; background-image: url('resources//imagenes/tab.gif'); font:11px arial; color:white; text-align:center; padding:4px;}
	
	.SM_co90023 {width:129px; height: 75px; border-top:; font:11px arial; color:#2D466F; text-align:center; text-decoration:underline; cursor:hand;}
	.SM_c90023  {width:129px; height: 75px; border-top:; font:11px arial; color:#2D466F; text-align:center;}
	
	.SM_cb90023 {background-color:#E7EBF0;}
	.SM_ps90023 {width:129px; position:relative; top:0;border-top:; background-image: url('resources/imagenes/tab.gif'); font:11px arial; color:white; text-align:center; padding:4px;}
	.SM_cs90023 {width:129px; border-top:0; font:11px arial; color:#2D466F; text-align:center;}
	.SMEmptyDiv90023 {overflow:hidden; height:1px; width:129px; border-top:;}
	</style>
	<script src="resources/js/utils.js"></script>
	<script type="text/javascript">
	var tabMenu = null;
	function menu_onload(){
		tabMenu = document.getElementById("tblMenu");
		if(tabMenu.rows.length<=0)return; 
		var firstSlide = tabMenu.rows(0).cells(0).children(0);
		var firstSlideSub = tabMenu.rows(0).cells(0).children(1);
		SMCallerName90023=firstSlide.id;
		SMinitiallyOpenSub90023=firstSlideSub.id;
		
		firstSlideSub.style.display='block';
		firstSlideSub.style.position='static';
		firstSlideSub.style.top='auto';
		firstSlideSub.style.height='auto';
		//firstSlideSub.style.height=129;						
		//tabMenu.height="100%";
	
		SMheightToOpen90023=document.body.clientHeight-((firstSlide.clientHeight)*tabMenu.rows.length);
		
		firstSlideSub.style.height=SMheightToOpen90023;	
		if(tabMenu.rows.length>=2){
			tabMenu.rows(1).cells(0).children(0).className = "SM_p90023";
		}
		mostrarSubMenu(firstSlideSub.id, firstSlide, 1);
	}
	function on_resize(){
		if(tabMenu.rows.length<=0)return; 
		var firstSlide = (SMCallerOpen90023!=null)?SMCallerOpen90023:document.getElementById(SMCallerName90023);
		var firstSlideSub = (SMobjOpen90023!=null)?SMobjOpen90023:document.getElementById(SMinitiallyOpenSub90023);
		//firstSlideSub.style.height=129;						
		//tabMenu.height="100%";
		
		SMheightToOpen90023=document.body.clientHeight-((firstSlide.clientHeight)*tabMenu.rows.length);
		SMheightToOpen90023=SMheightToOpen90023<0?100:SMheightToOpen90023;
		firstSlideSub.style.height=SMheightToOpen90023;
	
		mostrarSubMenu(firstSlideSub.id, firstSlide, 1);
	}
	runOnload(menu_onload);
	
	
	function mostrarSubMenu(subMenuId, obj, num) 
	{
		
		var tamano = 0;
		var arrDiv = obj.nextSibling.getElementsByTagName("div");
		
		obj.nextSibling.style.display = "";
		
		var firstSlide = tabMenu.rows(0).cells(0).children(0);
		var tamanoAdecuado = document.body.clientHeight-((firstSlide.clientHeight)*tabMenu.rows.length);
		
		for(var i = 0; i < arrDiv.length; i++) 
		{
			tamano += arrDiv[i].clientHeight;
		}
		
		if(tamano > tamanoAdecuado)
			tamano = tamanoAdecuado;
		
		SMheightToOpen90023 = tamano;
		
		var subMenu = document.getElementById(subMenuId);
	
		subMenu.style.height = tamano;
		
		SMpoc90023(subMenuId, obj, num);
	}
	</script>
<body topmargin=0 leftmargin=0 onResize="on_resize();" bgcolor="#E7EBF0">
<script type="text/javascript" src="resources/js/menu.js"></script>
<table id="tblMenu"
	style="BORDER-RIGHT: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-RIGHT: 1px solid #B7B7B7"
	height="" cellSpacing="0" cellPadding="0" border="0" width="129px">

	<c:if test="${sessionScope.tipoUsuario == 5}">
    <tr>
		<td><div class="SM_ps90023" id="SM900231" onmouseover='SMcs90023(this, "SM_po90023", "")' onclick='mostrarSubMenu("SM900231Sub", this, 1)' onmouseout='SMcs90023(this, "SM_p90023", "")'>Administrar Cliente</div>
			<div class="SM_cb90023" id="SM900231Sub" style="DISPLAY: block; overflow-y: auto; overflow-x:hidden; WIDTH: 129px;">
				 
				<m:menu-item onclick="loadPage('adminCliente/mostrarRegistroCliente.htm');" 
					image="/imagenes/xpexecutive.gif" 
					text="Registrar cliente"/>			

				<m:menu-item onclick="loadPage('adminCliente/mostrarConsultaCliente.htm');" 
					image="/imagenes/xpexecutive.gif"  
					text="Consultar clientes"/>					
				
				<div style="font:11px arial; height: 8px;"><br></div> 				
			</div>	
		</td>
	</tr>    
	</c:if>
	
	<c:if test="${sessionScope.tipoUsuario == 5}">
    <tr>
		<td><div class="SM_p90023" id="SM9002345" onmouseover='SMcs90023(this, "SM_po90023", "")' onclick='mostrarSubMenu("SM9002345Sub", this, 1)' onmouseout='SMcs90023(this, "SM_p90023", "")'>Administrar local</div>
			<div class="SM_cb90023" id="SM9002345Sub" style="DISPLAY: none; overflow-y: auto; overflow-x:hidden; WIDTH: 129px; POSITION: relative; TOP: 0px; HEIGHT: 0px">
	 
				 
				<m:menu-item onclick="loadPage('adminLocal/mostrarRegistroLocal.htm');" 
					image="/imagenes/xpexecutive.gif"  
					text="Registrar local"/>			

				<m:menu-item onclick="loadPage('adminLocal/mostrarConsultaLocal.htm');" 
					image="/imagenes/xpexecutive.gif"  
					text="Consultar locales"/>					
				
				<div style="font:11px arial; height: 8px;"><br></div> 				
			</div>	
		</td>
	</tr>    
	</c:if>
	
	<c:if test="${sessionScope.tipoUsuario == 5}">
    <tr>
		<td><div class="SM_p90023" id="SM9002373" onmouseover='SMcs90023(this, "SM_po90023", "")' onclick='mostrarSubMenu("SM9002373Sub", this, 1)' onmouseout='SMcs90023(this, "SM_p90023", "")'>Administrar usuario</div>
			<div class="SM_cb90023" id="SM9002373Sub" style="DISPLAY: none; overflow-y: auto; overflow-x:hidden; WIDTH: 129px; POSITION: relative; TOP: 0px; HEIGHT: 0px">
				 
				<m:menu-item onclick="loadPage('adminUsuario/mostrarRegistroUsuario.htm');" 
					image="/imagenes/xpexecutive.gif"  
					text="Registrar usuario"/>			

				<m:menu-item onclick="loadPage('adminUsuario/mostrarConsultaUsuario.htm');" 
					image="/imagenes/xpexecutive.gif"  
					text="Consultar usuarios"/>					
				
				<div style="font:11px arial; height: 8px;"><br></div> 				
			</div>	
		</td>
	</tr>    
	</c:if>
	
	  <tr>
		<td><div class="SM_ps90023" id="SM900232" onmouseover='SMcs90023(this, "SM_po90023", "")' onclick='mostrarSubMenu("SM900232Sub", this, 1)' onmouseout='SMcs90023(this, "SM_p90023", "")'>Administrar Promocion</div>
			<div class="SM_cb90023" id="SM900232Sub" style="DISPLAY: none; overflow-y: auto; overflow-x:hidden; WIDTH: 129px;POSITION: relative; TOP: 0px; HEIGHT: 0px">
				 
				<m:menu-item onclick="loadPage('adminPromocion/mostrarRegistroPromocion.htm');" 
					image="/imagenes/xpexecutive.gif"  
					text="Registrar promocion"/>			

				<m:menu-item onclick="loadPage('adminPromocion/mostrarConsultaPromocion.htm');" 
					image="/imagenes/xpexecutive.gif"  
					text="Consultar promociones"/>					
				
				<div style="font:11px arial; height: 8px;"><br></div> 				
			</div>	
		</td>
	</tr>  

</table>
</body>
<script type="text/javascript">
runOnload(menu_onload);
</script>
</html>
	
